<!--指向收藏夹的链接-->
<script setup>
import {setupMapState} from "@/assets/js/vuexUtils";
import {routeNames} from "@/router";
import NgaRouterLink from "@/components/common/link/NgaRouterLink.vue";

const props = defineProps({
  id: {type: Number, required: true},
  page: Number,
  bracket: Boolean,
})

const {currentUid} = setupMapState("Account", ['currentUid']);

const getRoute = (id, page) => {
  const name = routeNames.thread.favor
  const params = {id}
  return {name, params, query: {account: currentUid.value, page}}
}

</script>

<template>
  <nga-router-link :bracket="bracket" :route="getRoute(id,page)">
    <slot></slot>
  </nga-router-link>
</template>

<style scoped>

</style>